//
//  Extension+UIImageView.swift
//  CZWeibo31
//
//  Created by apple on 16/8/9.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit
import SDWebImage
extension UIImageView{
    // 便利构造函数
    convenience init(imgName: String){
        self.init(image: UIImage(named: imgName))
    }
    // 对SDWebImage 封装一次
    func hm_setImageWithString(imgName: String?,placeholderImgName: String){
        self.sd_setImageWithURL(NSURL(string: imgName ?? ""), placeholderImage: UIImage(named: placeholderImgName))
    }
}
